package com.hr.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hr.dao.ManagerDao;
import com.hr.model.ManagerModel;
import com.hr.service.ManagerService;
@Service
public class ManagerServiceImpl implements ManagerService{
	@Autowired
	private ManagerDao managerDao;
	@Override
	public ManagerModel checkLogin(ManagerModel managerModel) {
		
		if (managerModel == null)
			return null;
		List<ManagerModel> result = managerDao.find(managerModel.getAccount(),
				managerModel.getPassword());
		if(result!=null)
			return result.get(0);
		return null;
	}
}
